<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .rich {
        color: red;
      }
      .penniless {
        color: blue;
      }
      .penniless.dog {
        color: slategray;
      }
      p.penniless {
        color: green;
      }
      /* 我有一个效果想给所有人都加上,这时候可以使用并集选择器,将需要这个效果的元素都卸载一起,以逗号分隔 */
      .rich,
      .penniless {
        width: 200px;
        font-size: 30px;
        background-color: thistle;
      }
    </style>
  </head>
  <body>
    <div class="rich">张三</div>
    <div class="penniless">李四</div>
    <div class="penniless dog">小狗旺财</div>
    <div class="penniless dog">小猪佩奇</div>
    <p class="penniless">狮子辛巴</p>
  </body>
</html>
